@L}5 _$% l0$)$$Hȱ$ UhL" `e$$%`$%`  R@P!( L(1   Y I`  d  Ld M * @  $ % CC$$)%1 Udߥ$9%: !0 S$% DD˙`  }J)Lr d M * @  $ % CC$$)%1 Udߥ$9%: !0 S$%} DD˙`  }J)Lr J  ((  p L ()   J}L= ( L 0q A    IB JC;? D W } LL  ` W )LA!  ߰")-݆ p" } $G@LL 08`Q")<2Q0 -G$Ș݆ UL# ; p8(()(0ʥ)NQ` }$GȘ݆LU )L ݆ L GȘ ݆LL )W>Z   HH)H }p h  hyhy D L> L JJ    ! LA*` BF }7'8  M HN H` 8 Z  \LdJJ!"! GFE@F (!L }EE !E^ ^ E E7EȩEdE/EȩE  D } .L }  ;F d  ;?F7F? ( .   Z D LL d } . D  L    p  E` , d)  D L) 0BM݊L݉} ML  N݆ L NLML [ TEqEHȱEqEh 0Gȹ G} HLL GɛL  LFREE SECTORS G) *Gȩ GȽG GȌ*jj >G} C8jJ3j2CD( C202C ԠBX` N 1? l LlD:RAMDISK}.COMLu L1 L ;LHL  T`  `1  ɐ     `TU  } L ? .  t`GBJ ~DEHI B V0dV!}QDEHI VF9 ,0 ,0 s0hhL  L` H hDHEh"}DEL8HI4 0 HI,0 0  9 .G VLO#},0 L4*IJ`llD1:AUTORUN.SYSNEED MEM.SAV TO LOAD THIS FILE.D1:MEM.SAV J y08 B|DEHI$} V0 0`B;DEL`?<0LV`@ʆ v s? F0Ξ05: [ BDEHI%} VY8 B V  @  /DE `E:D1:DUP.SYSERROR-SAVING USER MEMORY ON DISKTYPE Y TO &}STILL RUN DOS B;DE J  (` 9 V⪍ ઍ  -'}LLu ÝDEHILV 9 .l 9 .l  `` s$B BH(}I|DE V BLV nB,DE JLV B V BLVDEIʩ BꭝLu  } 3E:}DISK OPERATING SYSTEM II VERSION COPYRIGHT 1984 ATARI CORP.A. DISK DIRECTORY I. FORMAT DISKB. RUN CARTRIDG*}E J. DUPLICATE DISKC. COPY FILE K. BINARY SAVED. DELETE FILE(S) L. BINARY LOADE. RENAME FILE M. RUN AT ADDRES+}SF. LOCK FILE N. CREATE MEM.SAVG. UNLOCK FILE O. DUPLICATE FILEH. WRITE DOS FILES P. FORMAT SINGLEL !N',}#"&))9(&*)/h)''-&؆莟R'S  vL/ˢ L }Insert DOS 2.0s, type Y Λx -}DEfHI 1莏#q! @ y0ɛ8A0,' ȅ 1 1ild! 1L!NO SUCH ITEMSELECT.} ITEM OR FOR MENU! 0 .z:*{}.|{ 1 0 0JB 18L%|DL/}%DIRECTORY--SEARCH SPEC,LIST FILE?[# 0 0 &|D3" 1L!NOT A DISK FILEN !B 1L!E# 1 !BD0}ED:}:1BJ|DE 1DEBHI 1 h0ߢ 0.1}  0?詛 1 y0YЛ 1 ;#L" ;#L! BL1TYPE "Y" TO DELETE...DELETE FILE SPEC2}COPY--FROM, TO?OPTION NOT ALLOWED736 FREE SECTORS COPYING---D1:DIRECK.COMl# 0|D .L/%#3}##JB|DE 1BHID#E 1#0: B 1L!#͑### B 1#c$0SY4}S1}:## # # .#Ƚ# # 𩛙## 1,#PD#ELJ- <.BJD#E 5}1 1HH 0hh|DL%1}:̳# L% #D#EL% 1 0 . .0O% 1L!WILD CARDS NOT A6}LLOWED IN DESTINATION 0 <.|K}N 2 FORMAT. t* 5) 1L!`) 0NΞ 0 L1) 1 L!BAD LOAD FILELOAD FROM WHAT FILE?) 0 ?}0#B 1L!WHAT FILE TO LOCK?) 0 0$B 1L!WHAT FILE TO UNLOCK?DUP DISK-SOURCE,DEST DRIVES?TYPE "Y" IF OK TO US@}E PROGRAM AREACAUTION: A "Y" INVALIDATES MEM.SAV.FE! +L1   `*  70 2 2A} 0.* 1 y0 0)INSERT BOTH DISKS, TYPE RETURN^, 1 y038逍 N, 1L! ,B}C, t*  Lx+, 0 ^, 1 y0 , ,0,0 ,L+ ,I0 ,Vǭ0C}Ξ, 0 }, 1 y0C,ШC, 0K'!" H H 'h h Lx+!EF 5L1L!D,I,HhD}` NOT ENOUGH ROOMINSERT SOURCE DISK,TYPE RETURNINSERT DESTINATION DISK,TYPE RETURNE}`  `8 rL1`-* 1P* 1 y0Y`hhL!NAME OF FILE TO MOVE?- 0 0|DL% <.F},^ 1 70 0 .@L# .BJ 1  DEHIB V L1 ,} 1 70,L.  G}JB|,#P#DE 1 HI BDEHHII 1 B 1 ,^ 1 70,0La- B V,#PH},^ 1 70 0L#L!-* 1P* 1 y0Yj383}mm ݭI}}`8}``|* ? ɛ,`|:-)| / 1L!`DESTINATION CANT BE DOJ}S.SYS0 0H{ 24Δ 28/L!/) 2 Π 2 0 ξK}hAΞB,0 J 1 BDEHI,HÝDE 1HIHIDELSAVE-GIVE L}FILE,START,END(,INIT,RUN)O S0 1`BDEPHI V` S0H 1 L!M}0 0 1L~0`PLEASE TYPE 1 LETTER,0`hhL! 70 1L0L<1 ,;ɛ7,"ɛ:ݦ1ݥN}A"D|ݤD|ȩ:|ȩ|ɛ,,(/+.ީ1 1,ɛ`轤{NAMEO} TOO LONG B VL!` L1I H1EΝDL1|mDiE` V0`8d/8 i:222 1 LP}!ERROR- 138ɛ+,' 20*.. өr2 1``2TOO MANY DIGITSINVALID HEXAQ}DECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8uR} ECIMAL PARAMETER800 0 8 00`,0'D800 H,ɛh`2L1NEED D1 THRU D8u This ARChive contains the sampleprograms that go with the Action!tutorials. See the companion ARC,ACTUTOR1, for the teT}xt. Also, pleasesee the copyright notices at thetop of each text file.orials. See the companion ARC,ACTUTOR1, for the teIPROC main() INT first_var, second_var, answer Print("First number? ") first_var=InputI() Print("Second V} number? ") second_var=InputI() PutE() PrintI(first_var) Print(" + ") PrintI(second_var) Print(" = ") answer = W} first_var + second_var PrintIE(answer) PutE() PrintI(first_var) Print(" - ") PrintI(second_var) Print(" = ") X}answer = first_var - second_var PrintIE(answer) PutE() PrintI(first_var) Print(" * ") PrintI(second_var) Print(" Y} = ") answer = first_var * second_var PrintIE(answer) PutE() PrintI(first_var) Print(" / ") PrintI(second_var) Z} Print(" = ") answer = first_var / second_var PrintIE(answer) Print(" With a remainder of ") answer = first_var MOD s [}econd_var PrintI(answer) PutE()RETURN r PrintIE(answer) Print(" With a remainder of ") answer = first_var MOD s .PROC main() INT first_var, second_var Print("First number: ") first_var=InputI() PutE() Print("Second numb]}er: ") second_var=InputI() PutE() IF first_var = second_var THEN PrintI(first_var) Print(" and ") PrintI(s^}econd_var) PrintE(" are equal!") PutE() FI IF first_var <> second_var THEN PrintI(first_var) Print(" and_} ") PrintI(second_var) PrintE(" are not equal!") PutE() FI IF first_var > second_var THEN PrintI(first_v`}ar) Print(" is greater than ") PrintIE(second_var) PutE() FI IF first_var >= second_var THEN PrintI(firsa}t_var) Print(" is greater than or equal to ") PrintIE(second_var) PutE() FI IF first_var < second_var THEN b} PrintI(first_var) Print(" is less than ") PrintIE(second_var) PutE() FI IF first_var <= second_var THEN c} PrintI(first_var) Print(" is less than or equal to ") PrintIE(second_var) PutE() FIRETURN ond_var THEN oPROC main() BYTE i, j j=0 Print("Press 1 to continue... ") i=InputB() WHILE i<>0 DO PutE() Prine}tE("Give me a number: ") PrintE("Enter a 0 to exit") i=InputB() j=j+i OD Print("The sum of your numbers is: "f}) PrintBE(j)RETURN PrintE("Enter a 0 to exit") i=InputB() j=j+i OD Print("The sum of your numbers is: "PROC main() CARD big_num BYTE divide PutE() PrintE("Give me a big number but") PrintE("it has to be less than 65,h}000") big_num = InputC() DO PutE() PrintE("What do you want to divide") Print("into ") PrintC(big_num) i} PrintE(" ?") divide = InputB() IF divide=0 THEN EXIT FI big_num = big_num / divide UNTIL j}big_num < 10 OD IF big_num > 10 THEN PutE() PrintE("You can't divide by zero!!!") FI PutE() Print("Big nuk}mber now equals ") PrintCE(big_num)RETURN tE() PrintE("You can't divide by zero!!!") FI PutE() Print("Big nu0PROC main() CARD big_num BYTE divide PutE() PrintE("Give me a big number but") PrintE("it has to be less than 65,m}000") big_num = InputC() DO PutE() PrintE("What do you want to divide") Print("into ") PrintC(big_num) n} PrintE(" ?") divide = InputB() IF divide=0 THEN EXIT FI big_num = big_num / divide UNTIL o}big_num < 10 OD IF big_num > 10 THEN PutE() PrintE("You can't divide by zero!!!") FI PutE() Print("Big nup}mber now equals ") PrintCE(big_num)RETURN tE() PrintE("You can't divide by zero!!!") FI PutE() Print("Big nu0;Here are a few examples of what you;can do with PrintF().PROC main() CARD dollars1, dollars2, total B r}YTE cents1, cents2, total_cents CARD questions, correct PutE() PrintF("%E%EHow many dollars in s} your account:%E $") dollars1=InputC() PrintF("%EAnd how many cents: $ 0.") cents1=InputB();If the user enters more t} than $0.99;then add 1 to the dollar amount. We;have to do this twice in case they;enter a number over 200. Remember,;a u}BYTE can be up to 255 IF cents1>99 THEN cents1= cents1 - 100 dollars1 = dollars1 + 1 FI IF cents1>99 THEN v} cents1= cents1 - 100 dollars1 = dollars1 + 1 FI PrintF("%EAnd how many dollars are you%Edepositing: $") dollars w}2=InputC() PrintF("%EAnd how many cents: $ 0.") cents2=InputB() IF cents2>99 THEN cents2 = cents2 - 100 dollar x}s2 = dollars2 + 1 FI IF cents2>99 THEN cents2= cents2 - 100 dollars2 = dollars2 + 1 FI total = dollars1 + do y}llars2 total_cents = cents1 + cents2 IF total_cents>99 THEN total_cents = total_cents - 100 total = total + 1 z}FI IF total_cents>99 THEN total_cents= total_cents - 100 total = total + 1 FI PrintF("%E%EYou now have $%U.%U {}in your%Eaccount.%E",total,total_cents);************************************;If you were to write the above line;without |}a PrintF and just use our;normal routines, you would have;this:;; PutE(); PutE(); Print("You now have $" }}); PrintC(total); Print("."); PrintB(total_cents); PrintE(" in your"); PrintE("account.");;Th ~}is will give the EXACT same output;as the 1 PrintF line. If you want;to try it, just erase the ";" at;the start of the in }dented lines.;***********************************;Now lets do a conversion with the;%H option PrintF("%E%E%EConvert }to Hex%E--------------%E%E") Print("Give me a CARD: ") total=InputC() PrintF("%EIn Hex %U is %H%E",total,total);One }last example, to use the % sign;you have to use "%%";The UNTIL loop makes sure the values;make sense.;IMPORTANT!!!!!!;Wh }en calculating percentages, always;multiply by 100 before you divide.;Here an example: If you go 10 out;of 100 it should }be 10%;Since Action! doesn't have decimals;if you divide first you get:;;10/100 = 0 (NOT .1);0 * 100 = 0;You get a } 0% instead of 10% DO PrintF("%E%EThis will give you test results%E") PrintF("%EHow many points possible: ") q }uestions=InputC() PrintF("%E%EAnd how many correct: ") correct=InputC() IF correct>questions THEN Pr }intF("%EYou can't have more correct than%Etotal possible!%E") FI UNTIL correct36 THEN ;are we out of range? new_xpos=3(} ;Yes, position '*' on the left FI ELSE ;x_rnum was a 0 so new_xpos==-1 ;we (}move left IF new_xpos<3 THEN ;are we out of range? new_xpos=36 ;yes, move '*' to the right FI (} FI old_ypos=new_ypos;also so we can erase the old '*' IF y_rnum=1 THEN ;should we move down? n(}ew_ypos==+1 ;yes IF new_ypos>21 THEN ;too far down? new_ypos=2 ;reset to top of screen F(}I ELSE new_ypos==-1 ;no, we have to move up IF new_ypos<1 THEN ;can't above the top of the screen (} new_ypos=21 ;move to the bottom FI FI ;here's where we move the '*';we send it old_xpos and old(}_ypos so;the old '*' can be erased. move(old_xpos, old_ypos, new_xpos, new_ypos);here we just delay the program by;(}giving it something useless to do;for a while. Like counting from 1;to 3000. You can delete these lines;to see how fast i(}t runs without;the delay FOR delay=1 TO 3000 DO OD OD ;end of the infinite loop ;RESET to endRET(}URN without;the delay FOR delay=1 TO 3000 DO OD OD ;end of the infinite loop ;RESET to endRET(;This is a simple graphing program; ;This FUNC gets the value that we;are going to plot. The 2 %C and;254s in the "Fr,}om 2 to 18:" line;are to erase the old value from the;screen that was input the last time;the FUNC was calledBYTE FUNC ,}get_input() BYTE how_many DO Position(2,21) PrintE("What is the upper Y limit?") PrintF("From 0 to 18: %C%C,}",254,254) how_many=InputB() UNTIL how_many<19 ODRETURN(how_many)PROC main() BYTE i, j, y, ,} value Print("}") ; clear the screen;* Set up the chart * FOR i=1 TO 4 DO PrintF("|%E|%E|%E|%E%E") OD,} PrintE("") PrintE(" 1 2 3") ;* Get 3 values to plot and then; plot the,}m * FOR j=1 TO 3 DO y=18 value = get_input() FOR i=1 TO value DO Position(7*j+2,y) Print(,}"*") y = y - 1 OD ODRETURN lue = get_input() FOR i=1 TO value DO Position(7*j+2,y) Print(,+;Here you play TIC-TAC-TOE against;the computer. The computer plays;by picking a random spot on the;board. If it is used0}, it picks;another until it finds an unused;place to play.MODULE;use a global because the board is;used by a number o0}f different;routines and each may or may not;change it. And we want that change;to affect the board everywhere.;;The AR0}RAY goes from 1 to 9. If that;spot has a 0, that means it is unused.;If it has a 1 that means the player;has an X there. 0} A 2 means the computer;placed a O there.BYTE ARRAY board(10);This PROC draws the board with the;X's and O's in the0}ir proper places,PROC print_screen() BYTE i, j, k k=0 PutE() FOR j=1 TO 3 DO FOR i=1 TO 3 0} DO k = k + 1 IF board(k)=1 THEN Print("X") ELSEIF board(k)=2 THEN Print("O") ELSE 0} Print(" ") FI IF i<>3 THEN Print("|") FI OD PutE() IF j<>3 THEN PrintE("0}") FI ODRETURN;Here we clear out the board by putting;0's in all the placesPROC clear_board() BYTE i F0}OR i=1 TO 10 DO board(i)=0 ODRETURN;Print a help screen so the player;knows how to choose his positionPROC hel0}p() PutE() PrintE("The board is set up this:") PutE() PrintE(" 1|2|3") PrintE(" ") PrintE(" 0} 4|5|6") PrintE(" ") PrintE(" 7|8|9") PutE() PrintE("Enter 0 for help.") PutE()RETURN;H0}ere we check all the possible ways to;win, vertical, horizontal and diagonal;to see it the player has 3 1's in a row.;It r0}eturns a 1 if the player has won;and a 0 otherwise.BYTE FUNC player_won() BYTE rval rval=0 IF board(1)=1 AND bo0}ard(2)=1 AND board(3)=1 THEN rval=1 FI IF board(4)=1 AND board(5)=1 AND board(6)=1 THEN rval=1 FI IF board(7)0}=1 AND board(8)=1 AND board(9)=1 THEN rval=1 FI IF board(1)=1 AND board(4)=1 AND board(7)=1 THEN rval=1 FI IF0} board(2)=1 AND board(5)=1 AND board(8)=1 THEN rval=1 FI IF board(3)=1 AND board(6)=1 AND board(9)=1 THEN rval=10} FI IF board(1)=1 AND board(5)=1 AND board(9)=1 THEN rval=1 FI IF board(3)=1 AND board(5)=1 AND board(7)=1 THEN 0} rval=1 FIRETURN(rval);Same thing as the above except it sees;if the computer has placed 3 2's in;a rowBYTE FUNC0} computer_won() BYTE rval rval=0 IF board(1)=2 AND board(2)=2 AND board(3)=2 THEN rval=1 FI IF board(4)=2 0}AND board(5)=2 AND board(6)=2 THEN rval=1 FI IF board(7)=2 AND board(8)=2 AND board(9)=2 THEN rval=1 FI IF bo0}ard(1)=2 AND board(4)=2 AND board(7)=2 THEN rval=1 FI IF board(2)=2 AND board(5)=2 AND board(8)=2 THEN rval=1 F0}I IF board(3)=2 AND board(6)=2 AND board(9)=2 THEN rval=1 FI IF board(1)=2 AND board(5)=2 AND board(9)=2 THEN r0}val=1 FI IF board(3)=2 AND board(5)=2 AND board(7)=2 THEN rval=1 FIRETURN(rval);Here the computer comes up wit0}h a;random move. If it is unused, it;returns where it wants to move. If;it chooses a spot already taken, it;picks until0} it finds a empty spot.;After 30 tries, if it didn't find a;empty spot, it just thinks the game is;a tie ("Cat's game") an0}d clears the;board to start overBYTE FUNC computer_turn() BYTE rnum, i i=0 DO rnum=Rand(9)+1 i = i 0}+ 1 IF i>30 THEN PutE() PrintE("Cat's game. We'll start over.") PutE() clear_board() EXIT0} FI UNTIL board(rnum)=0 ODRETURN(rnum)PROC main() CHAR ARRAY name(20) BYTE move, winner;* Set eve0}rything up * clear_board() Print("What is your name? ") InputS(name) PrintF("%EOk %S, you are X's.%E",name) help()0} winner=0 DO print_screen();*Get the player's move* DO PrintF("%E%S's turn: ",name) move=InputB()0} UNTIL move<10 OD ;*Do they need help?* IF move=0 THEN help() DO PrintF("%E%S's turn: ",na0}me) move=InputB() UNTIL move<10 OD FI;*check to see if the spot is empty or not* IF board(move0})<>0 THEN PrintE("That space is already taken!") ELSE board(move)=1 FI print_screen() ;*Did the 0}player win?* IF player_won() THEN winner=1 EXIT FI;*Did the computer win? If not get it's move* I0}F computer_won() THEN winner=0 ELSE move=computer_turn() board(move)=2 FI PrintF("%EComputer's 0}turn: %U%E",move) UNTIL computer_won() OD;*If we get here, either the computer; won or the player did (if the player0}; won we EXIT out of the loop and the; computer just used an UNTIL loop)* print_screen() IF winner=1 THEN PrintF("0}%E%EYou Won!!!!!%E") ELSE PrintF("%E%ESorry, the computer beat you.%E") FIRETURN IF winner=1 THEN PrintF("0];This program prints 2 words in;alphabetical order.PROC main() CHAR ARRAY first(20), second(20) Print4}E("Enter EXIT for the first word to end") PutE() DO Print("Give me a word: ") InputS(first) Print("Give me a4}nother word: ") InputS(second) PutE() PrintE("Alphabetized they are:") IF SCompare(first,second)<0 THEN 4} PrintF(" %S %S%E%E",first,second) ELSEIF SCompare(first,second)>0 THEN PrintF(" %S %S%E%E",second,first)4} ELSE PrintF("They are equal!%E%E") FI UNTIL SCompare(first,"EXIT")=0 ODRETURN %S%E%E",second,first)4d;Here we use devices and files to;view a text file from disk.;Every 21 lines it stops and;asks if you want to see more.;8}Press Q or q to stop and any other;for the next 21 linesMODULE CHAR ARRAY filename(30)PROC get_file() PrintE("Wh8}at file do you want to view?") Print("-> ") InputS(filename)RETURNBYTE FUNC more();more() returns 1 to see more of8} the;file and 0 if the user want to quit BYTE key, rval, i Print("more...") Close(2) Open(2,"K:",4,8}0) key=GetD(2) ;get a key from the keyboard Close(2);this section erases the word more by;printing 7 delete character8}s FOR i=1 TO 7 DO PrintF("%C",254) OD IF key='Q OR key='q THEN rval=0 ELSE rval=1 FI FOR i=1 TO 8}7 DO Put(126) ODRETURN(rval)PROC better_read() BYTE ARRAY line(50) BYTE num_lines num_lines=0 Close(18}) ;make sure the file isn't already open Open(1,filename,4,0) WHILE EOF(1)=0 ;are we at the end? DO num8}_lines=num_lines+1 InputSD(1,line) ; get a line PrintE(line) ; print it IF num_lines=21 THEN num_lines=8}0 IF more()=0 THEN EXIT FI FI OD Close(1)RETURNPROC main() get_file() better_read()RETU8}RN IF more()=0 THEN EXIT FI FI OD Close(1)RETURNPROC main() get_file() better_read()RETU8;here, we assign our POINTER to a ;special memory location. This is;how we can use POINTERs like a POKE;statement. ;In <}BASIC try this:; 10 POKE 710,0;and the same thing will happen.;The number 0 is the way the computer;knows black. And 710<} is the ;address where your Atari keeps the;text background color.PROC background() BYTE POINTER bkgnd bkgnd=71<}0 bkgnd^=0RETURN;Here I will show you how a POINTER;can change a parameter. Let's say;an employee wants to deduct $<}20;from his salary for the United Way;every paycheck.;Now you can just send his salary;to this PROC and it will make this<};decuction for you. ;I assume most of you think it;would be easier to use a global;salary variable.;Yes, that is anot<}her way to do it ;but this PROC would loose its;"independence."PROC chng_value(CARD POINTER wage) PrintE("United Way d<}eduction: $20") wage^=wage^-20RETURNPROC main() CARD salary background() salary=300 Print("Your salary is: "<}) PrintCE(salary) ;Send the chng_value(@salary) ;deduction PROC ;the addr<}ess of ;the variable Print("Your takehome pay is: ") PrintCE(salary) RETURN ;the addr<n;This is a very, very simple adventure;type program. There are 10 rooms;numbered 0-9. In each room there;are exits and m@}aybe a treasure.;The goal in this adventure is;to collect the treasures in the fewest;number of moves. When you think yo@}u;have all the treasures, eXit the;game and see your score.;This is FAR from a real adventure;game and it really isn't c@}hallenging;at all, but it does show the use;of ARRAYs of records.;Here is the record for each roomTYPE room=[BYTE north@}, south, east, west, treasure]DEFINE size="5" ;5 bytes p@}er roomBYTE ARRAY cave(50) ;save enough space ;for 10 roomsCARD score, turnsroom POINTER her@}e ; our POINTERBYTE room_num ;This holds the current ;room number the player ;is in.P@}ROC exits();*If a exit field in the record has; a 255, that means there is no; exit in that direction* PrintE("Exits: @}") IF here.north<>255 THEN Print("North ") FI IF here.south<>255 THEN Print("South ") FI IF here.east<>255 @}THEN Print("East ") FI IF here.west<>255 THEN Print("West ") FI PutE()RETURNPROC money();*Here we print @}how much treasure is; in the room* PrintF("%EThere is $%U here.%E",here.treasure)RETURNPROC description();*What does@} the room look like?* exits() money()RETURNBYTE FUNC get_command();*This is the controlling routine.; It gets a c@}ommand key and executes; it. It returns a 1 if the user; wants to quit, 0 otherwise. BYTE command turns = turns + 1@} PutE() Print("䠭 ") Open(1,"K:",4,0) command=GetD(1) Close(1);*I don't know if I mentioned this ; before@} or not. But when you GetD(); a key from the keyboard, the BYTE; returned is the ATASCII value of; that character. Examp@}le, if the; user press an A, command is set to; 65. A single quote before a; character means the ATASCII value; of that @}character. So 'A = 65 IF command='? THEN PrintE("Help") PutE() PrintE(" Commands") PrintE(" @} --------") PrintE(" N - Go North") PrintE(" S - Go South") PrintE(" E - Go East@}") PrintE(" W - Go West") PrintE(" T - Take Treasure") PrintE(" C - Current Score") P@}rintE(" R - Room Number") PrintE(" D - Room Description") PrintE(" X - Exit") PrintE(" A} ? - Help") PutE() ELSEIF command='R THEN PrintE("Room number") PrintF("%EYou are in room #%U%E",room_A}num) ELSEIF command='D THEN PrintE("Description") description() ELSEIF command='T THEN PrintE("Take TreaA}sure") IF here.treasure THEN score = score + here.treasure ;add the treasure to the score here.treasure=0 A} ;remove the treasure from athe room PrintE("Treasure taken!") ELSE PrintE("There is no treasure to take!") A} FI ELSEIF command='C THEN PrintE("Current Score") PrintF("%EYou have $%U in %U moves.%E",score,turns) ELSEIFA} command='N THEN PrintE("North") IF here.north<>255 THEN room_num=here.north here = cave + (room_num * siA}ze) description() ELSE PrintE("There is no exit in that direction.") FI ELSEIF command='S THEN PA}rintE("South") IF here.south<>255 THEN room_num=here.south here = cave + (room_num * size) description(A}) ELSE PrintE("There is no exit in that direction.") FI ELSEIF command='E THEN PrintE("East") IF hA }ere.east <>255 THEN room_num=here.east here = cave + (room_num * size) description() ELSE PrintA }E("There is no exit in that direction.") FI ELSEIF command='W THEN PrintE("West") IF here.west<>255 THEN A } room_num=here.west here = cave + (room_num * size) description() ELSE PrintE("There is no exit in thA }at direction.") FI ELSEIF command='X THEN PrintE("Exit") PrintF("%EYour final score is:%E $%U in %U moves.%E",A }score,turns) RETURN(1) ELSE Put(command) PutE() PrintE("I don't know that command!") PrintE("Use ? forA} help.") FIRETURN(0)PROC place_treasure();*Put a random amout of treasure in; a random room. BYTE rnd1, A}rnd2, counter room POINTER temp rnd2=Rand(6)+1 ; how many rooms will have treasure FOR counter=1 TO rnd2 DA}O rnd1=Rand(10) ;which room? temp = cave + (rnd1 * size) rnd1=Rand(240) ;how much money? temp.treasure=rndA}1 ODRETURNPROC init();*Now we have to read in the whole; cave in from the disk and initialize; some variables to thA}eir starting; values.;When we read the cave in from the ;data file on the disk, this is the;order it is read in: north, A}south,;east, west and the treasure amount.;Here's an example:; 255; 255; 6; 8; 0;This means thA}ere is no exit north;or south. Room 6 is to the east.;Room 8 is to the west. There is no;treasure. Actually, all the roA}oms;have 0 treasure. We put the treasure;in later. BYTE i turns=0 score=0 Open(2,"D:APROG12.DAT",4,0) FOR i=0A} TO 9 DO here = cave + (i * size) here.north=InputBD(2) here.south=InputBD(2) here.east=InputBD(2) hereA}.west=InputBD(2) here.treasure=InputBD(2) OD Close(2) place_treasure();Let's start in room 4 room_num=4 hereA} = cave + (room_num * size)RETURNPROC main() BYTE rval init() description() DO rval=get_command() UNTIL rA}val ODRETURN m * size)RETURNPROC main() BYTE rval init() description() DO rval=get_command() UNTIL r@;************************************;* Atari Phone book *;* by *;* E}Tom Johnson *;* for the Action!/PRO tutorial *;* *;* Originally transE}lated to *;* the Atari in BASIC XL *;* *;* based on TI Mailing List E} *;* by *;* Doug Hapeman *;* in *;* E} July 1983 Compute! *;* *;* Thanks to Ray Hill for *;* the ReadItemE} and WriteItem *;* routines *;* *;*This program is too big toE } compile*;*like normal. You must compile it *;*from disk. Like this: *;* *;E!}*Go to the monitor and type: *;* *;* C "D:APROG12.002" *;* E"} *;*Don't forget the second " at the *;*end. *;* E#} *;************************************ MODULEDEFINE Cls = "Put(125)" ;clear the screen ;****E$}********************************;* The following are the starting *;* places for each field *;***************E%}*********************DEFINE Lastname = "0"DEFINE Firstname = "13"DEFINE Address = "23"DEFINE City_state= E&}"63"DEFINE Zipcode = "103"DEFINE Phone = "114";------------------------------------DEFINE Max = "10E'}0" ;max number of peopleDEFINE Datasize = "128" ;byte per personDEFINE Totalsize = "12800" ;room for 100 pE(}eople ;gotton by ;Datasize*MaxBYTE E)} Choice, ;catch all variable ;for user input NumPeople E*};number of people currently ;in the database BYTE ARRAY Data_area(Totalsize), E+} search_person(13)PROC ReadItem(BYTE num);************************************;* This procedure prints item #num *E,};* to the screen *;************************************ BYTE POINTER ptr ptr = Data_area + (num * DE-}atasize) PrintF("Name: %S",ptr+Firstname) PrintF(" %S%E",ptr+Lastname) PrintF("Address: %S%E",ptr+Address) E.} PrintF("City, State: %S%E",ptr+City_state) PrintF("Zipcode: %S%E",ptr+Zipcode) PrintF("(P) %S%E",ptr+Phone)E/}RETURNPROC WriteItem(BYTE num);************************************;* This procedure writes data into *;* item #numE0} from the keyboard *;************************************ BYTE POINTER ptr ptr = Data_area + (num * Datasize) E1} Print(" Last name: ") InputS(ptr+Lastname) Print(" First name: ") InputS(ptr+Firstname) Print(" Address: ") InputSE2}(ptr+Address) Print(" City, State: ") InputS(ptr+City_state) Print(" Zipcode: ") InputS(ptr+Zipcode) Print(" Phone:E3} ") InputS(ptr+Phone) RETURNBYTE FUNC Getkey();************************************;* This function returns the ATE4}ASCII*;* value of the key pressed *;************************************ BYTE key Close(1) Open(1,"K:",4,E5}0) key=GetD(1) Close(1)RETURN(key)PROC Skip(BYTE lines);************************************;* This procedure placE6}es "lines" *;* EOLNs on the display for better *;* better screen formatting *;********************************E7}**** BYTE counter FOR counter=1 TO lines DO PutE() ODRETURNBYTE FUNC look();****************************E8}********;*Here we get a last name and if *;*the person is in the list, we *;*return their number. Return a 0 *;*E9}otherwise. *;************************************ BYTE num, found, key, rvalE:} BYTE POINTER ptr Cls num=0 found=0 Skip(5) Print("Last name? ") InputS(search_person) DO num==+1 ptE;}r = Data_area + (num * Datasize) IF Scompare(ptr+Lastname,search_person)=0 THEN PrintE("Is the person:") SkipE<}(2) Print(" ") PrintE(ptr+Firstname) Print(" ") PrintE(ptr+Lastname) Skip(2) Print("(E=}Y/N) ") key=Getkey() IF (key='Y) OR (key='y) THEN found=1 EXIT ELSE PrintE("No") E>} PutE() FI FI UNTIL num=NumPeople OD IF found=1 THEN rval=num ELSE rval=0 FIRETURN(rval)E?}PROC Change();************************************;* Procedure to change any of the *;* data for any person in the listE@}. *;* Requires the catch-all global *;* variable called Choice *;************************************ BYTEA}E num, key BYTE POINTER ptr DO num=look() IF num THEN DO DO Cls EB}ReadItem(num) PutE() PrintE("Press to change") Skip(2) PrintE(" 1 = Last name"EC}) PrintE(" 2 = First name(s)") PrintE(" 3 = Street address") PrintE(" 4 = City / StateED}") PrintE(" 5 = Zipcode") PrintE(" 6 = Phone number") PrintE(" 7 = No change") EE} Skip(5) Print("Your choice: ") Choice=InputB() UNTIL (Choice>0) AND (Choice<8) OD EF} ptr = Data_area + (num * Datasize) IF Choice=1 THEN Print("Last name was: ") PrintE(ptr+LastnEG}ame) Skip(2) PrintE("What is the new last name?") InputS(ptr+Lastname) ELSEIF Choice=2 EH}THEN Print("First name was: ") PrintE(ptr+Firstname) Skip(2) PrintE("What is the new EI}first name?") InputS(ptr+Firstname) ELSEIF Choice=3 THEN Print("Address was: ") PrintE(EJ}ptr+Address) Skip(2) PrintE("What is the new address?") InputS(ptr+Address) ELSEIF ChoiEK}ce=4 THEN Print("City / State was: ") PrintE(ptr+City_state) Skip(2) PrintE("What is EL}the new city / state?") InputS(ptr+City_state) ELSEIF Choice=5 THEN Print("Zipcode was: ") EM} PrintE(ptr+Zipcode) Skip(2) PrintE("What is the new zipcode?") InputS(ptr+Zipcode) EN}ELSEIF Choice=6 THEN Print("Phone number was: ") PrintE(ptr+Phone) Skip(2) PrintE("WhEO}at is the new phone number?") InputS(ptr+Phone) FI Skip(2) PrintE("Are there more changes fEP}or") PrintF("%S %S ?",ptr+Firstname,ptr+Lastname) PutE() Print("(Y/N) ") key=Getkey() UEQ}NTIL (key='n) OR (key='N) OD PrintE("No") FI PutE() PrintE("Change data for other names?") PrintEER}("(Y/N) ") key=Getkey() UNTIL (key='n) OR (key='N) OD RETURNPROC View();************************************ES};* This procedure allows the user to*;* see the whole list 2 people at a *;* time. The user can also exit to *;* the maiET}n menu at any time. *;************************************ BYTE counter=[0], two_counter=[0], temEU}pkey, flag Cls flag=0 FOR counter=1 TO NumPeople STEP 2 DO two_counter=0 DO ReadItem(counteEV}r+two_counter) Skip(3) two_counter==+1 UNTIL (two_counter=2) OR (counter+two_counter > NumPeople) OD EW}PrintE(" *Press to continue*") PrintE(" * for Main Index*") Skip(3) tempkey=Getkey() IF (tempkey='R)EX} OR (tempkey='r) THEN flag=1 EXIT FI OD IF flag=0 THEN PrintE(" *End of File*") PrintE(" *EY} Press to continue*") tempkey=Getkey() FIRETURN ;Here is the first time we reassign;the default device. EZ}What does that;mean? Everytime you compile your;Action! programs, Action! declares;a few variable for you. You saw thatE[};the EOF array was one of them.;Here's another one. BYTE device ;When you do a Print or any other;print type command (PrE\}intBE, PrintF; etc.), the output goes to your;screen. If you Open() a file and;assign device to that channel, all;the ouE]}tput will go there instead of;the screen. Example:;; Open(3,"D:FILE",8,0); device=3; ;All Print routines wilE^}l print to;that file. You should save the;value of device before you reassign;it. That way, you can put it back;to normE_}al. That is what happens in;the Search() routine below and in;PrintL() later on.PROC Search();***********************E`}*************;* This procedure searches the list *;* for a matching last name. If the *;* correct person is not found, theEa} *;* search continues until found or *;* out of data. *;************************************ BYTE Eb}num, key, holddev BYTE POINTER ptr CARD temperr Cls DO num=look() IF num THEN Cls Ec} ReadItem(num) Skip(4) PrintE("Do you want to print this") PrintE("out on your printer?") PutE()Ed} Print("(y/n) ") key=Getkey() IF (key='Y) OR (key='y) THEN PrintE("Yes") holddev=device ;Ee}save the normal Close(1) Open(1,"P:",8,0) device=1 ;reassign output to the printer REf}eadItem(num) Skip(2) Close(1) device=holddev ;put everything back to normal ELSE PriEg}ntE("No") FI ELSE Skip(3) Print(" The ") Print(search_person) PrintE(" you are looking foEq}B%DOS SYSB*)DUP SYSBS00READMETXTBUAPROG 301B\APROG 302BdAPROG 401BgAPROG 402BlAPROG 403BqAPROG 601BAPROG 701BAPROG 702BAPROG 801B'APROG 901BAPROG 902B APROG10 001B APROG11 001B.APROG12 001BAPROG12 002BIRUNTIME ACTr") PrintE(" is not in this file.") FI Skip(3) PrintE("Search more names?") Print("(Y/N) ") key=GEr}etkey() IF (key='y) OR (key='Y) THEN PrintE("Yes") FI UNTIL (key='n) OR (key='N) ODRETURNPROC Add();Es}************************************;* This procedure adds people to the*;* end of the list. *;***********Et}************************* BYTE key BYTE POINTER ptr DO Cls Skip(2) Print("Enter data: ") NumPeople==Eu}+1 PrintBE(NumPeople) WriteItem(NumPeople);************************************;* Verify the entry Ev} *;************************************ Cls Print("Entry #") PrintBE(NumPeople) Skip(3) ReadItem(NumPeoEw}ple) Skip(5) PrintE("Add more names?") Print("(Y/N) ") key=Getkey() UNTIL (key='n) OR (key='N) OR (NumPeoplEx}e=Max) ODRETURNPROC Delete();************************************;* This procedure finds a person in *;* the list aEy}nd deletes him. It then*;* move all persons after the *;* deleted one physically forward in*;* the list. The speed oEz}f Action! *;* really shines in this PROC. *;************************************ BYTE num, key, couE{}nter BYTE POINTER ptr, ptr2 Cls DO num=look() IF num THEN FOR counter=num TO NumPeople E|} DO ptr = Data_area + (counter * Datasize) ptr2 = Data_area + ((counter+1) * Datasize) Scopy(ptr+LE}}astname,ptr2+Lastname) Scopy(ptr+Firstname,ptr2+Firstname) Scopy(ptr+Address,ptr2+Address) Scopy(ptr+E~}City_state,ptr2+City_state) Scopy(ptr+Zipcode,ptr2+Zipcode) Scopy(ptr+Phone,ptr2+Phone) OD NumPeoE}ple==-1 ELSE Skip(3) Print(" The ") Print(search_person) PrintE(" you are looking for") PrE}intE(" is not in this file.") FI Skip(3) PrintE("More deletions?") Print("(Y/N) ") key=Getkey() IF (E}key='y) OR (key='Y) THEN PrintE("Yes") FI UNTIL (key='n) OR (key='N) ODRETURNPROC Switch(BYTE x,i);******E}******************************;* Procedure to switch all the *;* elements of person x with person *;* i. E} *;************************************ BYTE ARRAY n(40) BYTE POINTER ptr, ptr2 ptE}r = Data_area + (x * Datasize) ptr2 = Data_area + (i * Datasize) SCopy(n,ptr+Lastname) SCopy(ptr+Lastname,ptr2+LastnameE}) SCopy(ptr2+Lastname,n) SCopy(n,ptr+Firstname) SCopy(ptr+Firstname,ptr2+Firstname) SCopy(ptr2+Firstname,n) SCopy(nE},ptr+Address) SCopy(ptr+Address,ptr2+Address) SCopy(ptr2+Address,n) SCopy(n,ptr+City_state) SCopy(ptr+City_state,ptr2E}+City_state) SCopy(ptr2+City_state,n) SCopy(n,ptr+Zipcode) SCopy(ptr+Zipcode,ptr2+Zipcode) SCopy(ptr2+Zipcode,n) SCE}opy(n,ptr+Phone) SCopy(ptr+Phone,ptr2+Phone) SCopy(ptr2+Phone,n)RETURNPROC Alphabetize();**************************E}**********;* It was too hard to figure out *;* what was going on in the alpha- *;* betize routine in the original. *E};* When I originally translated *;* the TI version into BASIC XL, *;* I used the same algorithm. *;* But to tE}ranslate it into struc- *;* tured code was hopeless! *;* So, I used a Selection Sort *;* instead. I realize E}that a *;* selection sort isn't exactly the *;* fastest sort method available but*;* it gets the job done. E} *;* Don't worry if you don't *;* understand this PROC, I got it *;* out of a book. After you get a *;* betE}ter handle on Action! you will*;* be able to figure it out. *;************************************ BYTE first, E} current, least BYTE POINTER ptr, ptr2 Cls Skip(5) PrintE(" Please wait...") PE}rintE(" The list is begin arranged") FOR first=1 TO (NumPeople-1) DO least=first FOR current=(first+1) TO NumPeoE}ple DO ptr = Data_area + (current * Datasize) ptr2 = Data_area + (least * Datasize) IF (SCompare(ptr+LaE}stname,ptr2+Lastname)<0) OR ((SCompare(ptr+Firstname,ptr2+Lastname)=0) AND (SCompare(ptr+Firstname,ptr2+FirsE}tname)<0)) THEN least=current Switch(least,first) FI OD ODRETURNPROC Save();***************E}*********************;* This procedure saves the data to *;* the filename entered. For disk *;* users the D: or D2: mustE} be *;* entered. *;* *;* The first thing in the data file *E};* is the number of people in the *;* list. This is just a BYTE. *;* The comes the actual data about *;* each perE}son. *;************************************ BYTE ARRAY filename(15) BYTE POINTER ptr BYTE numE} Cls PrintE("What is the name of your") PrintE("storage device?") Skip(2) PrintE("Example:") PrintE(" C:") PriE}ntE(" or") PrintE(" D:FILE.DAT ") PutE() PrintE("Disk user, be sure to") PrintE("include the D: or D2: ") Skip(E}2) Print("Filename: ") InputS(filename) IF filename(0)>0 THEN ;* check to see if filename is empty Close(1) E} Open(1,filename,8,0) PrintBDE(1,NumPeople) FOR num=1 to NumPeople DO ptr = Data_area + (num * Datasize) E} PrintDE(1,ptr+Lastname) PrintDE(1,ptr+Firstname) PrintDE(1,ptr+Address) PrintDE(1,ptr+City_state) E} PrintDE(1,ptr+Zipcode) PrintDE(1,ptr+Phone) OD Close(1) FI RETURNPROC Load();*********************E}***************;* This procedure loads the data *;* from the filename entered. For *;* disk users the D: or D2: must E}be *;* entered. *;************************************ BYTE ARRAY filename(15) BYTE POINTER ptE}r BYTE num, key Cls PrintE("What is the name of your") PrintE("storage device?") Skip(2) PrintE("ExampE}le:") PrintE(" C:") PrintE(" or") PrintE(" D:FILE.DAT ") PutE() PrintE("Disk user, be sure to") PrintE("incE}lude the D: or D2: ") Skip(2) Print("Filename: ") InputS(filename) IF filename(0)>0 THEN ;* check to see if filenE}ame is empty Close(1) Open(1,filename,4,0) NumPeople=InputBD(1) FOR num=1 TO NumPeople DO ptr = DatE}a_area + (num * Datasize) InputSD(1,ptr+Lastname) InputSD(1,ptr+Firstname) InputSD(1,ptr+Address) InpE}utSD(1,ptr+City_state) InputSD(1,ptr+Zipcode) InputSD(1,ptr+Phone) OD Close(1) Cls PrintF(" %S%EE}",filename) Skip(2) Print("This file has ") PrintB(NumPeople) PrintE(" entries.") Skip(2) Print(" * E}") PrintB(Max) PrintE(" entries maximum * ") Skip(12) Print(" Press to continue") key=Getkey() E}FI RETURNPROC PrintL() ;************************************;* This procedure dumps the all the *;* data to the priE}nter. *;************************************ BYTE num, holddev, key CARD temperr holddevE}=device ;save the normal output device Close(1) Open(1,"P:",8,0) Cls Skip(11) PrintE(" Please wait..E}.") PrintE(" while printer is working") device=1 FOR num=1 TO NumPeople DO ReadItem(num) Skip(2) ODE} Close(1) device=holddev ;put the output back the way it was Skip(3) Print(" Press to continue") key=GetkeE}y()RETURNPROC Main() BYTE POINTER fgnd, bgnd fgnd=709 bgnd=710 NumPeople=0 Graphics(0) bgnE}d^=0 ;Turn background to black fgnd^=12 ;And characters to white Zero(Data_area,Totalsize) ;Clear out tE}he data area PrintE(" * ATARI Phone book *") PutE() PrintE(" by") PutE() PrintE(" Thomas M. JohnE}son") PutE() PrintE(" Available from") PutE() PrintE("Villa Video's Bargain Cellar") PrintE(" (414) 265-5E}149") PrintE(" ExpressNet Node X11") Skip(11) Print(" Press to begin") Choice=Getkey() DO DO E} Cls PrintE(" Main Index") Skip(4) PrintE("Press To") Skip(3) PrintE(" 1 = View namE}es list") PrintE(" 2 = Search for a name") PrintE(" 3 = Add a name") PrintE(" 4 = Change a name")E} PrintE(" 5 = Delete a name") PrintE(" 6 = Alphabetize the list") PrintE(" 7 = Save the data file")E} PrintE(" 8 = Load the data file") PrintE(" 9 = Print the list") PrintE(" 10 = Finish the session")E} Skip(4) Print("Your choice: ") Choice=InputB() UNTIL (Choice>0) AND (Choice<11) OD IF Choice=1E} THEN View() ELSEIF Choice=2 THEN Search() ELSEIF Choice=3 THEN Add() ELSEIF Choice=4 THEN E} Change() ELSEIF Choice=5 THEN Delete() ELSEIF Choice=6 THEN Alphabetize() ELSEIF Choice=7 THEN E} Save() ELSEIF Choice=8 THEN Load() ELSEIF Choice=9 THEN PrintL() ELSEIF Choice=10 THEN Cls E} Skip(3) PrintE("Are you sure you want to") PrintE("end this session?") Print("(Y/N) ") Choice=GetE}key() IF (Choice='Y) OR (Choice='y) THEN PrintE("Yes") Skip(5) PrintE("Have a nice day!") E} FI FI UNTIL (Choice='Y) OR (Choice='y) ODRETURNtE("Yes") Skip(5) PrintE("Have a nice day!") D;PROC _CPYPRM=*()SET $4EE = _CPYPRM[$85$A0$86$A1$84$A2$18$68$85$84$69$03$A8$68$85$85$69$00$48$98$48$A0$01$B1$84$85$82$C8$I}B1$84$85$83$C8$B1$84$A8$B9$A0$00$91$82$88$10$F8$60]PROC _CHGSGN=*()[$85$C0$86$C1$38$A9$00$E5$C0$48$A9$00$E5$C1$AA$68$60I}]PROC _FIXSGN=*()[$86$C2$E0$00$10$03$20 _CHGSGN $85$82$86$83$A5$85$45$C2$85$C2$A6$85$10$09$A5$84$20 _CHGSGN $85$84$86$8I}5$60]PROC _FIXRES=*()[$A5$86$A6$87$A4$C2$10$03$4C _CHGSGN$60]PROC _MUL=*()SET $4E8 = _MUL[$20 _FIXSGN $A9$00$85$86$I}85$87$A5$82$D0$04$A5$83$F0$22$A5$84$D0$04$A5$85$F0$1A$46$85$66$84$90$0D$18$A5$86$65$82$85$86$A5$87$65$83$85$87$06$82$26$8I}3$38$B0$D6$4C _FIXRES]PROC _DIV=*()SET $4EA = _DIV[$20 _FIXSGN $A9$00$85$86$85$87$85$C1$A9$01$85$C0$A5$82$D0$04$A5$83$FI}0$5F$A5$84$D0$04$A5$85$F0$57$A5$82$C5$84$A5$83$E5$85$90$0F$A5$C1$30$0B$06$84$26$85$06$C0$26$C1$38$B0$E7$A5$C0$D0$04$A5$C1I}$F0$36$A5$82$D0$04$A5$83$F0$2E$A5$82$C5$84$A5$83$E5$85$90$19$38$A5$82$E5$84$85$82$A5$83$E5$85$85$83$A5$86$05$C0$85$86$A5$8I}7$05$C1$85$87$46$85$66$84$46$C1$66$C0$38$B0$C2$4C_FIXRES]PROC _MODOP=*()SET $4EC = _MODOP[$20 _DIV $A5$82$A6$83$60]I}PROC _RSHOP=*()SET $4E6 = _RSHOP[$A4$84$F0$0A$86$86$46$86$6A$88$D0$FA$A6$86$60]PROC _LSHOP=*()SET $4E4 = _LSHOP[$A4$8I}4$F0$0A$86$86$0A$26$86$88$D0$FA$A6$86$60]PROC _ERROU=*()[$A9$70$AA$A9$0C$9D$42$03$20$56$E4$8A$38$E9$10$D0$F1$6C$0A$00]I}PROC _ERRVEC=*()[_ERROU]PROC _DEVIC=*()[$00]MODULECARD Error=_ERRVECBYTE device=_DEVICPROC _GOCIO=*()[$20$56$E4I}$10$1A$C0$88$F0$06$68$68$98$6C _ERRVEC $48$8A$48$4A$4A$4A$4A$AA$A9$01$9D$C0$05$68$AA$68$60]PROC _LODCHN=*()[$C9$08$90$0I}7$68$68$A9$86$6C _ERRVEC$0A$0A$0A$0A$AA$60]PROC _STONAM=*()[$18$69$01$9D$44$03$98$69$00$9D$45$03$60]PROC _SHFTR=*()I}[$48$8A$A8$68$AA$AD _DEVIC $60]PROC _CLREOL=*()[$48$A9$00$85$A5$68$60]PROC _SETEOL=*()[$48$A9$01$85$A5$68$60]PROC I}_PRECON=*()[$8A$48$98$AA$68$A0$03$84$A3$A0$FD$60]PROC _DOPRNT=*()[$86$A3$84$A4$20 _LODCHN $A9$00$9D$49$03$A8$B1$A3$F0$1I}A$9D$48$03$18$A5$A3$69$01$9D$44$03$A5$A4$69$00$9D$45$03$A9$0B$9D$42$03$20 _GOCIO $A5$A5$F0$12$A9$00$9D$48$03$9D$49$03$A9$0I}B$9D$42$03$A9$9B$20 _GOCIO $60]PROC StrC=*(CARD c, s)[$85$D4$86$D5$84$A2$20$AA$D9$20$E6$D8$A0$00$B1$F3$30$06$C8$91$A2$3I}8$B0$F6$29$7F$C8$91$A2$98$A0$00$91$A2$60]PROC StrB=*(BYTE b CARD s)[$84$A3$48$8A$A8$A2$00$68$4C StrC]PROC StrI=*(INT I}i CARD s)[$E0$00$30$03$4C StrC $49$FF$85$A2$8A$49$FF$AA$E6$A2$D0$01$E8$A5$A2$20StrC $A0$00$18$B1$A2$69$01$91$A2$A8$88$BI}1$A2$C8$91$A2$88$88$D0$F7$C8$A9$2D$91$A2$60]PROC _DOPRNC=*()[$48$20 _PRECON $20 StrC $68$A2$FD$A0$03$4C _DOPRNT]PROCI} DOPRNI=*()[$48$20 _PRECON $20 StrI $68$A2$FD$A0$03$4C _DOPRNT]PROC PrintCD=*(BYTE d CARD c)[$20 _CLREOL $4C _DOPRNC]I}PROC PrintC=*(CARD c)[$20 _SHFTR $4C PrintCD]PROC PrintCDE=*(BYTE d CARD c)[$20 _SETEOL $4C _DOPRNC]PROC PrintCE=*(CI}ARD c)[$20 _SHFTR $4C PrintCDE]PROC PrintBD=*(BYTE d, b)[$A0$00$4C PrintCD]PROC PrintB=*(BYTE b)[$20 _SHFTR $4C PrinI}tBD]PROC PrintBDE=*(BYTE d, b)[$A0$00$4C PrintCDE]PROC PrintBE=*(BYTE b)[$20 _SHFTR $4C PrintBDE]PROC PrintID=*(BYI}TE d INT i)[$20 _CLREOL $4C _DOPRNI]PROC PrintI=*(INT i)[$20 _SHFTR $4C PrintID]PROC PrintIDE=*(BYTE d INT i)[$20 _SI}ETEOL $4C _DOPRNI]PROC PrintIE=*(INT i)[$20 _SHFTR $4C PrintIDE]PROC PrintD=*(BYTE d CARD s)[$20 _CLREOL $4C _DOPRNT]I}PROC Print=*(CARD s)[$20 _SHFTR $4C PrintD]PROC PrintDE=*(BYTE d CARD s)[$20 _SETEOL $4C _DOPRNT]PROC PrintE=*(CARI}D s)[$20 _SHFTR $4C PrintDE]PROC _HEXSTR=*()[$85$84$86$85$A9$FD$85$A2$A9$03$85$A3$A0$00$A9$05$91$A2$C8$A9$24$91$A2$A9$I}00$A2$04$06$84$26$85$2A$CA$D0$F8$69$30$C9$3A$90$02$69$06$C8$91$A2$C0$05$D0$E5$60]PROC PrintF=*(CARD s,a,b,c,d,e,f,g)[$8I}5$82$86$83$84$A2$AD _DEVIC $0A$0A$0A$0A$85$C1$A0$00$84$87$84$C0$B1$82$F0$4C$85$86$E6$C0$F0$46$A4$C0$C4$86$F0$02$B0$3E$B1$8I}2$C9$25$D0$3E$E6$C0$C8$C4$86$F0$02$B0$35$B1$82$C9$25$F0$2F$C9$45$F0$29$A8$A6$87$E0$0E$B0$D4$B5$A2$48$B5$A3$E8$E8$86$87$AA$I}68$C0$43$F0$15$C0$49$F0$34$C0$48$F0$3C$C0$53$F0$3F$38$B0$1D$60$38$B0$B2$A9$9B$A8$A6$C1$A9$00$9D$48$03$9D$49$03$A9$0B$9D$4I}2$03$98$20 _GOCIO $38$B0$E4$A0$03$84$A3$A0$FD$20 StrC $38$B0$0F$A0$03$84$A3$A0$FD$20 StrI $38$B0$03$20 _HEXSTR $A9$FD$A2$0I}3$85$84$86$85$A6$C1$A9$00$9D$49$03$A8$B1$84$F0$B5$9D$48$03$18$A5$84$69$01$9D$44$03$A5$85$69$00$9D$45$03$A9$0B$9D$42$03$20I}_GOCIO $38$B0$98]PROC PutD=*(BYTE d, c)[$86$A0$20 _LODCHN $A9$00$9D$48$03$9D$49$03$A9$0B$9D$42$03$A5$A0$20 _GOCIO$60]I}PROC PutDE=*(BYTE d)[$A2$9B$4C PutD]PROC Put=*(BYTE c)[$AA$AD _DEVIC $4C PutD]PROC PutE=*()[$A9$9B$4C Put]BYTE FI}UNC ValB=*(CARD a)CARD FUNC ValC=*(CARD a)INT FUNC ValI=*(CARD a)[$85$A2$86$A3$A9$00$85$A0$85$A1$85$A5$A8$B1$A2$85$A4$C8$I}B1$A2$C9$20$F0$F9$C9$2D$D0$0B$C6$A5$C8$C4$A4$F0$02$B0$31$B1$A2$38$E9$30$90$2A$C9$0A$B0$26$48$06$A0$26$A1$A5$A0$A6$A1$0A$26I}$A1$0A$26$A1$18$65$A0$85$A0$8A$65$A1$85$A1$18$68$65$A0$85$A0$90$CD$E6$A1$38$B0$C8$A5$A5$F0$0D$38$A9$00$E5$A0$85$A0$A9$00$I}E5$A1$85$A1$60]PROC _DOINPT=*()[$86$A4$84$A5$20 _LODCHN $18$A5$A4$69$01$9D$44$03$A5$A5$69$00$9D$45$03$A5$A3$F0$18$9D$48I}$03$A9$00$9D$49$03$A9$05$9D$42$03$20 _GOCIO $BD$48$03$F0$03$38$E9$01$A0$00$91$A4$A5$A6$F0$07$A5$A4$A6$A5$4C ValC $60]BYI}TE FUNC InputBD=*(BYTE d)CARD FUNC InputCD=*(BYTE d)INT FUNC InputID=*(BYTE d)[$48$A9$78$85$A3$A9$01$85$A6$68$A2$FD$A0$03I}$4C _DOINPT]BYTE FUNC InputB=*()CARD FUNC InputC=*()INT FUNC InputI=*()[$AD _DEVIC$4C InputCD]PROC InputMD=*(BYTE d I}CARD s BYTE l)[$48$A9$00$85$A6$68$4C _DOINPT]PROC InputSD=*(BYTE d CARD s)[$48$A9$FF$85$A3$68$4C InputMD]PROC InputS=I}*(CARD s)[$20 _SHFTR $4C InputSD]CHAR FUNC GetD=*(BYTE d)[$20 _LODCHN $A9$00$9D$48$03$9D$49$03$A9$07$9D$42$03$20 _GOCIOI}$85$A0$60]PROC Open=*(BYTE d CARD s BYTE m, a)[$86$A1$20 _LODCHN $A5$A1$20 _STONAM $A5$A3$9D$4A$03$A5$A4$9D$4B$03$A9$0I}3$9D$42$03$20 _GOCIO $8A$4A$4A$4A$4A$AA$A9$00$9D$C0$05$60]PROC Close=*(BYTE d)[$20 _LODCHN $A9$0C$9D$42$03$20_GOCIO $60I}]PROC XIO=*(BYTE d,z,c,a1,a2 CARD s)[$20 _LODCHN $98$9D$42$03$A5$A3$9D$4A$03$A5$A4$9D$4B$03$A5$A5$A4$A6$20_STONAM $20 _I}GOCIO $60]PROC Note=*(BYTE d CARD s, o)[$86$A1$84$A2$20 _LODCHN $A9$26$9D$42$03$20 _GOCIO $A0$00$BD$4C$03$91$A1$BD$4E$0I}3$91$A3$BD$4D$03$C8$91$A1$60]PROC Point=*(BYTE d CARD s BYTE o)[$86$A1$20 _LODCHN $A5$A1$9D$4C$03$98$9D$4D$03$A5$A3$9D$4I}E$03$A9$25$9D$42$03$20 _GOCIO $60]PROC Graphics=*(BYTE m)[$48$A2$60$A9$0C$9D$42$03$20$56$E4$68$9D$4B$03$49$10$09$0C$9D$I}4A$03$A9$53$85$A0$A9$3A$85$A1$A9$A0$9D$44$03$A9$00$9D$45$03$A9$03$9D$42$03$20 _GOCIO$60]PROC SetColor=*(BYTE r, h, l)[I}$C9$05$B0$13$85$A0$8A$0A$0A$0A$0A$85$A1$98$29$0F$05$A1$A6$A0$9D$C4$02$60]PROC Position=*(CARD x BYTE y)[$85$55$86$56$84$I}54$60]PROC Plot=*(CARD x BYTE y)[$20 Position $A9$06$AE$FD$02$4CPutD]PROC DrawTo=*(CARD x BYTE y)[$20 Position $A2$6I}0$A9$11$9D$42$03$AD$FB$02$8D$FD$02$20 _GOCIO$60]PROC Fill=*(CARD x BYTE y)[$20 Position $A2$60$A9$12$9D$42$03$AD$FB$02I}$8D$FD$02$20 _GOCIO$60]BYTE FUNC Locate=*(CARD x BYTE y)[$20 Position $A9$06$4C GetD]PROC Sound=*(BYTE c, p, d, v)[$I}C9$04$B0$25$86$A1$0A$AA$A9$00$8D$08$D2$A9$03$8D$0F$D2$A5$A3$29$0F$85$A3$98$29$0E$0A$0A$0A$0A$05$A3$9D$01$D2$A5$A1$9D$00$D2I}$60]PROC SndRst=*()[$A9$00$A2$07$9D$00$D2$CA$10$FA$60]BYTE FUNC Paddle=*(BYTE p)[$29$07$AA$BD$70$02$85$A0$60]BYTE I}FUNC PTrig=*(BYTE p)[$29$07$AA$BD$7C$02$85$A0$60]BYTE FUNC Stick=*(BYTE p)[$29$03$AA$BD$78$02$85$A0$60]BYTE FUNC STriI}g=*(BYTE p)[$29$03$AA$BD$84$02$85$A0$60]INT FUNC SCompare=*(CARD s1, s2)[$85$A4$86$A5$84$A2$A0$00$84$A0$84$A1$B1$A4$85$I}A6$B1$A2$85$A7$C4$A6$F0$15$C4$A7$F0$11$C8$B1$A4$D1$A2$F0$F1$90$03$E6$A0$60$C6$A0$C6$A1$60$A5$A6$C5$A7$F0$F9$B0$F0$90$F1]I}PROC SCopy=*(CARD d, s)[$85$A0$86$A1$84$A2$A0$00$B1$A2$A8$B1$A2$91$A0$C0$00$F0$04$88$38$B0$F4$60]PROC SCopyS=*(CARD d, I}s BYTE b, e)[$85$A0$86$A1$84$A2$A0$00$84$A6$B1$A2$C5$A5$B0$02$85$A5$A5$A4$F0$15$C5$A5$F0$02$B0$0F$A4$A4$E6$A4$B1$A2$E6$A6I}$A4$A6$91$A0$38$B0$E7$A5$A6$A0$00$91$A0$60]PROC SAssign=*(CARD d, s BYTE b, e)[$85$A0$86$A1$84$A2$A5$A4$F0$3B$C5$A5$F0$I}02$B0$35$85$A7$C6$A7$A0$00$84$A8$B1$A0$85$A9$B1$A2$85$AA$A5$A7$C5$A5$B0$15$A5$A8$C5$AA$B0$0F$E6$A8$A4$A8$B1$A2$E6$A7$A4$A7I}$91$A0$38$B0$E5$A5$A7$C5$A9$90$04$A0$00$91$A0$60]BYTE FUNC Rand=*(BYTE r)[$85$A2$C6$A2$A9$01$C5$A2$B0$05$38$2A$38$B0$F7J}$85$A3$AD$0A$D2$25$A3$C5$A2$F0$04$90$02$B0$F3$85$A0$60]PROC Poke=*(CARD a BYTE v)[$85$A0$86$A1$98$A0$00$91$A0$60]PROCJ} PokeC=*(CARD a, v)[$20 Poke $C8$A5$A3$91$A0$60]BYTE FUNC Peek=*(CARD a)CARD FUNC PeekC=*(CARD a)[$85$A2$86$A3$A0$00$B1J}$A2$85$A0$C8$B1$A2$85$A1$60]PROC SetBlock=*(CARD a, l, v)[$85$A0$86$A1$84$A2$A0$00$A5$A2$D0$04$A5$A3$F0$16$A5$A4$91$A0$J}C8$D0$02$E6$A1$C6$A2$A5$A2$C9$FF$D0$E7$C6$A3$38$B0$E2$60]PROC Zero=*(CARD a, l)[$48$A9$00$85$A4$68$4C SetBlock]PROC J}MoveBlock=*(CARD d, s, l)[$85$A0$86$A1$84$A2$A0$00$A5$A4$D0$04$A5$A5$F0$18$B1$A2$91$A0$C8$D0$04$E6$A1$E6$A3$C6$A4$A5$A4$C9J}$FF$D0$E5$C6$A5$38$B0$E0$60]MODULE;--------end of RUNTIME.ACT------------91$A0$C8$D0$04$E6$A1$E6$A3$C6$A4$A5$A4$C9HS